package com.wander.provider.service.impl;

import com.wander.api.service.UserDubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * @author Wander.Zeng
 * @create 2018-02-05 17:30
 * @desc UserDubboServiceImpl
 */
@Service("userDubboService")
public class UserDubboServiceImpl implements UserDubboService {

    private Logger logger = LoggerFactory.getLogger(UserDubboServiceImpl.class);

    @Override
    public String login(String loginName, String password, Long id) {
        logger.info("用户登录：[username:{}, password:{}]", loginName, password);
        if (null != loginName && null != password) {
            logger.info("用户校验通过。[username:{}]", loginName);
            return "success " + id;
        }
        logger.info("用户校验失败！[username:{}]", loginName);
        return "false";
    }

}
